<!doctype html>
<html lang="en-us">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.59.1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Restful统一Json工具类，带分页信息 | 林贤钦</title>
    <meta property="og:title" content="Restful统一Json工具类，带分页信息 - 林贤钦">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content="2019-12-10T15:37:21&#43;08:00">
        
        
    <meta property="article:modified_time" content="2019-12-10T15:37:21&#43;08:00">
        
    <meta name="Keywords" content="java,博客,项目管理,软件架构,公众号,小程序">
    <meta name="description" content="Restful统一Json工具类，带分页信息">
        
    <meta name="author" content="林贤钦">
    <meta property="og:url" content="http://linxianqin.gitee.io/post/Restful%E7%BB%9F%E4%B8%80Json%E5%B7%A5%E5%85%B7%E7%B1%BB%E5%B8%A6%E5%88%86%E9%A1%B5%E4%BF%A1%E6%81%AF/">
    <link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/css/normalize.css">
    
        <link rel="stylesheet" href="/css/prism.css">
    
    <link rel="stylesheet" href="/css/style.css">
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

    


    
    
</head>

<body>
<header id="header" class="clearfix">
	<div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="http://linxianqin.gitee.io">
                        林贤钦
                    </a>
                
                <p class="description">专注于Java、微信小程序、移动互联网、项目管理、软件架构</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="current" href="http://linxianqin.gitee.io">首页</a>
                    
                    <a  href="http://linxianqin.gitee.io/archives/" title="归档">归档</a>
                    
                    <a  href="http://linxianqin.gitee.io/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
        
        
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title">Restful统一Json工具类，带分页信息</h1>
                        </header>
                        <date class="post-meta meta-date">
                            2019年12月10日
                        </date>
                        
                        <div class="post-meta">
                            <span>|</span>
                            
                                <span class="meta-category"><a href="http://linxianqin.gitee.io/categories/java">java</a></span>
                            
                        </div>
                        
                        
                        <div class="post-meta">
                            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span> 阅读</span></span>
                        </div>
                        
                        
                        <div class="post-content">
							<nav id="TableOfContents">
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="#1-resp工具类">1. Resp工具类</a></li>
<li><a href="#2-pageinfo-用于封装分页信息的">2. PageInfo 用于封装分页信息的</a></li>
<li><a href="#3-errorcode-用于定义错误码">3. ErrorCode 用于定义错误码</a></li>
<li><a href="#4-httpstatus-提取自org-springframework-http-可以自己引入">4. HttpStatus 提取自org.springframework.http,可以自己引入</a></li>
<li><a href="#6-测试示例">6. 测试示例：</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
                            

<h3 id="1-resp工具类">1. Resp工具类</h3>

<pre><code class="language-java">import java.io.Serializable;
import java.util.Map;

/**
 * @Description: Restful统一Json响应对象封装
 */
public class Resp&lt;T&gt; implements Serializable {
    private static final long serialVersionUID = 1L;

    private final static String SUCCESS_CODE = &quot;200&quot;;

    /**
     * 返回状态码
     */
    private String status;

    /**
     * 返回消息
     */
    private String message;

    /**
     * 返回内容
     */
    private T data;

    /**
     * 分页信息
     */
    private PageInfo page;

    /**
     * 其他内容
     */
    private Map&lt;String, Object&gt; ext;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Map&lt;String, Object&gt; getExt() {
        return ext;
    }

    public void setExt(Map&lt;String, Object&gt; ext) {
        this.ext = ext;
    }

    public PageInfo getPage() {
        return page;
    }

    public void setPage(PageInfo page) {
        this.page = page;
    }

    public Resp(){
        this.status = SUCCESS_CODE;
        this.message = &quot;SUCCESS&quot;;
    }

    public Resp(String status, String message) {
        this.status = status;
        this.message = message;
    }

    public Resp(String status, String message, T data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public Resp(String status, String message, T data, Map&lt;String, Object&gt; ext) {
        this.status = status;
        this.message = message;
        this.data = data;
        this.ext = ext;
    }

    public Resp(String status, String message, T data, PageInfo pageInfo) {
        this.status = status;
        this.message = message;
        this.data = data;
        this.page = pageInfo;
    }

    public Resp(String status, String message, T data, Map&lt;String, Object&gt; ext, PageInfo pageInfo) {
        this.status = status;
        this.message = message;
        this.data = data;
        this.ext = ext;
        this.page = pageInfo;
    }

    public Resp(String status, String message, T data, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        this.status = status;
        this.message = message;
        this.data = data;
        this.page = pageInfo;
    }

    public Resp(String status, String message, T data, Map&lt;String, Object&gt; ext, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        this.status = status;
        this.message = message;
        this.data = data;
        this.ext = ext;
        this.page = pageInfo;
    }

    //快速返回成功
    public static &lt;T&gt;Resp success(){
        return new Resp&lt;T&gt;(SUCCESS_CODE,&quot;请求成功&quot;,null);
    }

    public static &lt;T&gt;Resp success(T result){
        return new Resp&lt;T&gt;(SUCCESS_CODE,&quot;请求成功&quot;,result);
    }

    public static &lt;T&gt;Resp success(String message, T result){
        return new Resp&lt;T&gt;(SUCCESS_CODE,message,result);
    }

    public static &lt;T&gt;Resp success(String message, T result, Map&lt;String, Object&gt; extra){
        return new Resp&lt;T&gt;(SUCCESS_CODE,message,result, extra);
    }

    public static &lt;T&gt;Resp success(T result, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return new Resp&lt;T&gt;(SUCCESS_CODE,&quot;请求成功&quot;,result, pageInfo);
    }
    
    public static &lt;T&gt;Resp success(T result, Map&lt;String, Object&gt; extra, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return new Resp&lt;T&gt;(SUCCESS_CODE,&quot;请求成功&quot;,result, extra,pageInfo);
    }

    public static &lt;T&gt;Resp success(String message, T result, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return new Resp&lt;T&gt;(SUCCESS_CODE,message,result,pageInfo);
    }

    public static &lt;T&gt;Resp success(String message, T result, Map&lt;String, Object&gt; extra, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return new Resp&lt;T&gt;(SUCCESS_CODE,message,result, extra,pageInfo);
    }

    //快速返回失败状态
    public static &lt;T&gt;Resp fail(){
        return new Resp&lt;T&gt;(ErrorCode.SYSTEM_ERROR.getCode(),ErrorCode.SYSTEM_ERROR.getMessage());
    }

    public static &lt;T&gt;Resp fail(T result){
        return new Resp&lt;T&gt;(ErrorCode.SYSTEM_ERROR.getCode(),ErrorCode.SYSTEM_ERROR.getMessage(),result);
    }
    
    public &lt;T&gt;Resp fail(String message, T result){
        return new Resp&lt;T&gt;(ErrorCode.SYSTEM_ERROR.getCode(),message,result);
    }

    public &lt;T&gt;Resp fail(String message, T result, Map&lt;String, Object&gt; extra){
        return new Resp&lt;T&gt;(ErrorCode.SYSTEM_ERROR.getCode(),message,result, extra);
    }

    public static &lt;T&gt;Resp fail(ErrorCode errorCode){
        return new Resp&lt;T&gt;(errorCode.getCode(),errorCode.getMessage());
    }

    public static &lt;T&gt;Resp fail(ErrorCode errorCode, T result){
        return new Resp&lt;T&gt;(errorCode.getCode(),errorCode.getMessage(),result);
    }

    public static &lt;T&gt;Resp fail(ErrorCode errorCode, String message, T result){
        return new Resp&lt;T&gt;(errorCode.getCode(),message,result);
    }

    public static &lt;T&gt;Resp fail(ErrorCode errorCode, String message, T result, Map&lt;String, Object&gt; extra){
        return new Resp&lt;T&gt;(errorCode.getCode(),message,result, extra);
    }

    //快速返回自定义状态码
    public static &lt;T&gt;Resp result(String statusCode, String message){
        return new Resp&lt;T&gt;(statusCode,message);
    }

    public static &lt;T&gt;Resp result(String statusCode, String message, T result){
        return new Resp&lt;T&gt;(statusCode,message,result);
    }

    public static &lt;T&gt;Resp result(String statusCode, String message, T result, Map&lt;String, Object&gt; extra){
        return new Resp&lt;T&gt;(statusCode,message,result, extra);
    }

    public static &lt;T&gt;Resp result(String statusCode, String message, T result, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return new Resp&lt;T&gt;(statusCode,message,result, pageInfo);
    }

    public static &lt;T&gt;Resp result(String statusCode, String message, T result, Map&lt;String, Object&gt; extra, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return new Resp&lt;T&gt;(statusCode,message,result, extra,pageInfo);
    }

    //快速返回Http状态
    public static &lt;T&gt;Resp httpStatus(HttpStatus httpStatus, String message){
        return result(httpStatus.toString(),message);
    }

    public static &lt;T&gt;Resp httpStatus(HttpStatus httpStatus, String message, T result){
        return result(httpStatus.toString(),message,result);
    }

    public static &lt;T&gt;Resp httpStatus(HttpStatus httpStatus, String message, T result, Map&lt;String, Object&gt; extra){
        return result(httpStatus.toString(),message,result, extra);
    }

    public static &lt;T&gt;Resp httpStatus(HttpStatus httpStatus, String message, T result, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return result(httpStatus.toString(),message,result, total, pageNo, pageSize);
    }

    public static &lt;T&gt;Resp httpStatus(HttpStatus httpStatus, String message, T result, Map&lt;String, Object&gt; extra, Long total, Integer pageNo, Integer pageSize){
        PageInfo pageInfo = new PageInfo(total, pageNo, pageSize);
        return result(httpStatus.toString(),message,result, extra, total, pageNo, pageSize);
    }
}

</code></pre>

<h3 id="2-pageinfo-用于封装分页信息的">2. PageInfo 用于封装分页信息的</h3>

<pre><code class="language-java">import java.io.Serializable;

/**
 * @Description: 分页信息
 */
public class PageInfo implements Serializable{


    private static final long serialVersionUID = 1L;
    /**
     * 总记录数
     */
    private Long total;
    /**
     * 总页数
     */
    private Long totalPages;
    /**
     * 当前页
     */
    private Integer pageNo;
    /**
     * 页记录数
     */
    private Integer pageSize;

    public PageInfo(Long total) {
        this.total = total;
    }

    public PageInfo(Long total, Integer pageNo,
                    Integer pageSize) {
        this.total = total;
        this.totalPages = (total - 1) / pageSize + 1;
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }

    public static PageInfo page(Long total) {
        return new PageInfo(total);
    }

    public static PageInfo page( Long total, Integer pageNo,
                                      Integer pageSize) {
        return new PageInfo(total, pageNo, pageSize);
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Long getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(Long totalPages) {
        this.totalPages = totalPages;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }
}

</code></pre>

<h3 id="3-errorcode-用于定义错误码">3. ErrorCode 用于定义错误码</h3>

<pre><code class="language-java">/**
 * @Description: 错误码
 */
public enum ErrorCode {

    SYSTEM_ERROR(500, &quot;系统错误&quot;),
    PARAMETER_CHECK_ERROR(400, &quot;参数校验错误&quot;),
    AUTH_VALID_ERROR(701, &quot;用户权限不足&quot;),
    UNLOGIN_ERROR(401, &quot;用户未登录或登录状态超时失效&quot;),
    ;

    private final Integer value;
    private final String message;

    ErrorCode(int value, String message) {
        this.value = value;
        this.message = message;
    }

    public int getValue() {
        return value;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return value.toString();
    }

    public String getCode() {
        return value.toString();
    }

    public static ErrorCode getByCode(Integer value) {
        for (ErrorCode _enum : values()) {
            if (_enum.getValue() == value) {
                return _enum;
            }
        }
        return null;
    }

}

</code></pre>

<h3 id="4-httpstatus-提取自org-springframework-http-可以自己引入">4. HttpStatus 提取自org.springframework.http,可以自己引入</h3>

<pre><code class="language-java">/**
 * Enumeration of HTTP status codes.
 *
 * &lt;p&gt;The HTTP status code series can be retrieved via {@link #series()}.
 *
 * @author Arjen Poutsma
 * @author Sebastien Deleuze
 * @author Brian Clozel
 * @since 3.0
 * @see HttpStatus.Series
 * @see &lt;a href=&quot;http://www.iana.org/assignments/http-status-codes&quot;&gt;HTTP Status Code Registry&lt;/a&gt;
 * @see &lt;a href=&quot;http://en.wikipedia.org/wiki/List_of_HTTP_status_codes&quot;&gt;List of HTTP status codes - Wikipedia&lt;/a&gt;
 */
public enum HttpStatus {

    // 1xx Informational

    /**
     * {@code 100 Continue}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.2.1&quot;&gt;HTTP/1.1: Semantics and Content, section 6.2.1&lt;/a&gt;
     */
    CONTINUE(100, &quot;Continue&quot;),
    /**
     * {@code 101 Switching Protocols}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.2.2&quot;&gt;HTTP/1.1: Semantics and Content, section 6.2.2&lt;/a&gt;
     */
    SWITCHING_PROTOCOLS(101, &quot;Switching Protocols&quot;),
    /**
     * {@code 102 Processing}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2518#section-10.1&quot;&gt;WebDAV&lt;/a&gt;
     */
    PROCESSING(102, &quot;Processing&quot;),
    /**
     * {@code 103 Checkpoint}.
     * @see &lt;a href=&quot;http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal&quot;&gt;A proposal for supporting
     * resumable POST/PUT HTTP requests in HTTP/1.0&lt;/a&gt;
     */
    CHECKPOINT(103, &quot;Checkpoint&quot;),

    // 2xx Success

    /**
     * {@code 200 OK}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.3.1&quot;&gt;HTTP/1.1: Semantics and Content, section 6.3.1&lt;/a&gt;
     */
    OK(200, &quot;OK&quot;),
    /**
     * {@code 201 Created}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.3.2&quot;&gt;HTTP/1.1: Semantics and Content, section 6.3.2&lt;/a&gt;
     */
    CREATED(201, &quot;Created&quot;),
    /**
     * {@code 202 Accepted}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.3.3&quot;&gt;HTTP/1.1: Semantics and Content, section 6.3.3&lt;/a&gt;
     */
    ACCEPTED(202, &quot;Accepted&quot;),
    /**
     * {@code 203 Non-Authoritative Information}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.3.4&quot;&gt;HTTP/1.1: Semantics and Content, section 6.3.4&lt;/a&gt;
     */
    NON_AUTHORITATIVE_INFORMATION(203, &quot;Non-Authoritative Information&quot;),
    /**
     * {@code 204 No Content}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.3.5&quot;&gt;HTTP/1.1: Semantics and Content, section 6.3.5&lt;/a&gt;
     */
    NO_CONTENT(204, &quot;No Content&quot;),
    /**
     * {@code 205 Reset Content}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.3.6&quot;&gt;HTTP/1.1: Semantics and Content, section 6.3.6&lt;/a&gt;
     */
    RESET_CONTENT(205, &quot;Reset Content&quot;),
    /**
     * {@code 206 Partial Content}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7233#section-4.1&quot;&gt;HTTP/1.1: Range Requests, section 4.1&lt;/a&gt;
     */
    PARTIAL_CONTENT(206, &quot;Partial Content&quot;),
    /**
     * {@code 207 Multi-Status}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc4918#section-13&quot;&gt;WebDAV&lt;/a&gt;
     */
    MULTI_STATUS(207, &quot;Multi-Status&quot;),
    /**
     * {@code 208 Already Reported}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc5842#section-7.1&quot;&gt;WebDAV Binding Extensions&lt;/a&gt;
     */
    ALREADY_REPORTED(208, &quot;Already Reported&quot;),
    /**
     * {@code 226 IM Used}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc3229#section-10.4.1&quot;&gt;Delta encoding in HTTP&lt;/a&gt;
     */
    IM_USED(226, &quot;IM Used&quot;),

    // 3xx Redirection

    /**
     * {@code 300 Multiple Choices}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.4.1&quot;&gt;HTTP/1.1: Semantics and Content, section 6.4.1&lt;/a&gt;
     */
    MULTIPLE_CHOICES(300, &quot;Multiple Choices&quot;),
    /**
     * {@code 301 Moved Permanently}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.4.2&quot;&gt;HTTP/1.1: Semantics and Content, section 6.4.2&lt;/a&gt;
     */
    MOVED_PERMANENTLY(301, &quot;Moved Permanently&quot;),
    /**
     * {@code 302 Found}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.4.3&quot;&gt;HTTP/1.1: Semantics and Content, section 6.4.3&lt;/a&gt;
     */
    FOUND(302, &quot;Found&quot;),
    /**
     * {@code 302 Moved Temporarily}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc1945#section-9.3&quot;&gt;HTTP/1.0, section 9.3&lt;/a&gt;
     * @deprecated in favor of {@link #FOUND} which will be returned from {@code HttpStatus.valueOf(302)}
     */
    @Deprecated
    MOVED_TEMPORARILY(302, &quot;Moved Temporarily&quot;),
    /**
     * {@code 303 See Other}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.4.4&quot;&gt;HTTP/1.1: Semantics and Content, section 6.4.4&lt;/a&gt;
     */
    SEE_OTHER(303, &quot;See Other&quot;),
    /**
     * {@code 304 Not Modified}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7232#section-4.1&quot;&gt;HTTP/1.1: Conditional Requests, section 4.1&lt;/a&gt;
     */
    NOT_MODIFIED(304, &quot;Not Modified&quot;),
    /**
     * {@code 305 Use Proxy}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.4.5&quot;&gt;HTTP/1.1: Semantics and Content, section 6.4.5&lt;/a&gt;
     * @deprecated due to security concerns regarding in-band configuration of a proxy
     */
    @Deprecated
    USE_PROXY(305, &quot;Use Proxy&quot;),
    /**
     * {@code 307 Temporary Redirect}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.4.7&quot;&gt;HTTP/1.1: Semantics and Content, section 6.4.7&lt;/a&gt;
     */
    TEMPORARY_REDIRECT(307, &quot;Temporary Redirect&quot;),
    /**
     * {@code 308 Permanent Redirect}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7238&quot;&gt;RFC 7238&lt;/a&gt;
     */
    PERMANENT_REDIRECT(308, &quot;Permanent Redirect&quot;),

    // --- 4xx Client Error ---

    /**
     * {@code 400 Bad Request}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.1&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.1&lt;/a&gt;
     */
    BAD_REQUEST(400, &quot;Bad Request&quot;),
    /**
     * {@code 401 Unauthorized}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7235#section-3.1&quot;&gt;HTTP/1.1: Authentication, section 3.1&lt;/a&gt;
     */
    UNAUTHORIZED(401, &quot;Unauthorized&quot;),
    /**
     * {@code 402 Payment Required}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.2&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.2&lt;/a&gt;
     */
    PAYMENT_REQUIRED(402, &quot;Payment Required&quot;),
    /**
     * {@code 403 Forbidden}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.3&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.3&lt;/a&gt;
     */
    FORBIDDEN(403, &quot;Forbidden&quot;),
    /**
     * {@code 404 Not Found}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.4&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.4&lt;/a&gt;
     */
    NOT_FOUND(404, &quot;Not Found&quot;),
    /**
     * {@code 405 Method Not Allowed}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.5&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.5&lt;/a&gt;
     */
    METHOD_NOT_ALLOWED(405, &quot;Method Not Allowed&quot;),
    /**
     * {@code 406 Not Acceptable}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.6&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.6&lt;/a&gt;
     */
    NOT_ACCEPTABLE(406, &quot;Not Acceptable&quot;),
    /**
     * {@code 407 Proxy Authentication Required}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7235#section-3.2&quot;&gt;HTTP/1.1: Authentication, section 3.2&lt;/a&gt;
     */
    PROXY_AUTHENTICATION_REQUIRED(407, &quot;Proxy Authentication Required&quot;),
    /**
     * {@code 408 Request Timeout}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.7&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.7&lt;/a&gt;
     */
    REQUEST_TIMEOUT(408, &quot;Request Timeout&quot;),
    /**
     * {@code 409 Conflict}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.8&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.8&lt;/a&gt;
     */
    CONFLICT(409, &quot;Conflict&quot;),
    /**
     * {@code 410 Gone}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.9&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.9&lt;/a&gt;
     */
    GONE(410, &quot;Gone&quot;),
    /**
     * {@code 411 Length Required}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.10&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.10&lt;/a&gt;
     */
    LENGTH_REQUIRED(411, &quot;Length Required&quot;),
    /**
     * {@code 412 Precondition failed}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7232#section-4.2&quot;&gt;HTTP/1.1: Conditional Requests, section 4.2&lt;/a&gt;
     */
    PRECONDITION_FAILED(412, &quot;Precondition Failed&quot;),
    /**
     * {@code 413 Payload Too Large}.
     * @since 4.1
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.11&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.11&lt;/a&gt;
     */
    PAYLOAD_TOO_LARGE(413, &quot;Payload Too Large&quot;),
    /**
     * {@code 413 Request Entity Too Large}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2616#section-10.4.14&quot;&gt;HTTP/1.1, section 10.4.14&lt;/a&gt;
     * @deprecated in favor of {@link #PAYLOAD_TOO_LARGE} which will be returned from {@code HttpStatus.valueOf(413)}
     */
    @Deprecated
    REQUEST_ENTITY_TOO_LARGE(413, &quot;Request Entity Too Large&quot;),
    /**
     * {@code 414 URI Too Long}.
     * @since 4.1
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.12&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.12&lt;/a&gt;
     */
    URI_TOO_LONG(414, &quot;URI Too Long&quot;),
    /**
     * {@code 414 Request-URI Too Long}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2616#section-10.4.15&quot;&gt;HTTP/1.1, section 10.4.15&lt;/a&gt;
     * @deprecated in favor of {@link #URI_TOO_LONG} which will be returned from {@code HttpStatus.valueOf(414)}
     */
    @Deprecated
    REQUEST_URI_TOO_LONG(414, &quot;Request-URI Too Long&quot;),
    /**
     * {@code 415 Unsupported Media Type}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.13&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.13&lt;/a&gt;
     */
    UNSUPPORTED_MEDIA_TYPE(415, &quot;Unsupported Media Type&quot;),
    /**
     * {@code 416 Requested Range Not Satisfiable}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7233#section-4.4&quot;&gt;HTTP/1.1: Range Requests, section 4.4&lt;/a&gt;
     */
    REQUESTED_RANGE_NOT_SATISFIABLE(416, &quot;Requested range not satisfiable&quot;),
    /**
     * {@code 417 Expectation Failed}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.5.14&quot;&gt;HTTP/1.1: Semantics and Content, section 6.5.14&lt;/a&gt;
     */
    EXPECTATION_FAILED(417, &quot;Expectation Failed&quot;),
    /**
     * {@code 418 I'm a teapot}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2324#section-2.3.2&quot;&gt;HTCPCP/1.0&lt;/a&gt;
     */
    I_AM_A_TEAPOT(418, &quot;I'm a teapot&quot;),
    /**
     * @deprecated See &lt;a href=&quot;http://tools.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-webdav-protocol-06.txt&quot;&gt;WebDAV Draft Changes&lt;/a&gt;
     */
    @Deprecated
    INSUFFICIENT_SPACE_ON_RESOURCE(419, &quot;Insufficient Space On Resource&quot;),
    /**
     * @deprecated See &lt;a href=&quot;http://tools.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-webdav-protocol-06.txt&quot;&gt;WebDAV Draft Changes&lt;/a&gt;
     */
    @Deprecated
    METHOD_FAILURE(420, &quot;Method Failure&quot;),
    /**
     * @deprecated See &lt;a href=&quot;http://tools.ietf.org/rfcdiff?difftype=--hwdiff&amp;url2=draft-ietf-webdav-protocol-06.txt&quot;&gt;WebDAV Draft Changes&lt;/a&gt;
     */
    @Deprecated
    DESTINATION_LOCKED(421, &quot;Destination Locked&quot;),
    /**
     * {@code 422 Unprocessable Entity}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc4918#section-11.2&quot;&gt;WebDAV&lt;/a&gt;
     */
    UNPROCESSABLE_ENTITY(422, &quot;Unprocessable Entity&quot;),
    /**
     * {@code 423 Locked}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc4918#section-11.3&quot;&gt;WebDAV&lt;/a&gt;
     */
    LOCKED(423, &quot;Locked&quot;),
    /**
     * {@code 424 Failed Dependency}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc4918#section-11.4&quot;&gt;WebDAV&lt;/a&gt;
     */
    FAILED_DEPENDENCY(424, &quot;Failed Dependency&quot;),
    /**
     * {@code 426 Upgrade Required}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2817#section-6&quot;&gt;Upgrading to TLS Within HTTP/1.1&lt;/a&gt;
     */
    UPGRADE_REQUIRED(426, &quot;Upgrade Required&quot;),
    /**
     * {@code 428 Precondition Required}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc6585#section-3&quot;&gt;Additional HTTP Status Codes&lt;/a&gt;
     */
    PRECONDITION_REQUIRED(428, &quot;Precondition Required&quot;),
    /**
     * {@code 429 Too Many Requests}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc6585#section-4&quot;&gt;Additional HTTP Status Codes&lt;/a&gt;
     */
    TOO_MANY_REQUESTS(429, &quot;Too Many Requests&quot;),
    /**
     * {@code 431 Request Header Fields Too Large}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc6585#section-5&quot;&gt;Additional HTTP Status Codes&lt;/a&gt;
     */
    REQUEST_HEADER_FIELDS_TOO_LARGE(431, &quot;Request Header Fields Too Large&quot;),
    /**
     * {@code 451 Unavailable For Legal Reasons}.
     * @see &lt;a href=&quot;https://tools.ietf.org/html/draft-ietf-httpbis-legally-restricted-status-04&quot;&gt;
     * An HTTP Status Code to Report Legal Obstacles&lt;/a&gt;
     * @since 4.3
     */
    UNAVAILABLE_FOR_LEGAL_REASONS(451, &quot;Unavailable For Legal Reasons&quot;),

    // --- 5xx Server Error ---

    /**
     * {@code 500 Internal Server Error}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.6.1&quot;&gt;HTTP/1.1: Semantics and Content, section 6.6.1&lt;/a&gt;
     */
    INTERNAL_SERVER_ERROR(500, &quot;Internal Server Error&quot;),
    /**
     * {@code 501 Not Implemented}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.6.2&quot;&gt;HTTP/1.1: Semantics and Content, section 6.6.2&lt;/a&gt;
     */
    NOT_IMPLEMENTED(501, &quot;Not Implemented&quot;),
    /**
     * {@code 502 Bad Gateway}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.6.3&quot;&gt;HTTP/1.1: Semantics and Content, section 6.6.3&lt;/a&gt;
     */
    BAD_GATEWAY(502, &quot;Bad Gateway&quot;),
    /**
     * {@code 503 Service Unavailable}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.6.4&quot;&gt;HTTP/1.1: Semantics and Content, section 6.6.4&lt;/a&gt;
     */
    SERVICE_UNAVAILABLE(503, &quot;Service Unavailable&quot;),
    /**
     * {@code 504 Gateway Timeout}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.6.5&quot;&gt;HTTP/1.1: Semantics and Content, section 6.6.5&lt;/a&gt;
     */
    GATEWAY_TIMEOUT(504, &quot;Gateway Timeout&quot;),
    /**
     * {@code 505 HTTP Version Not Supported}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc7231#section-6.6.6&quot;&gt;HTTP/1.1: Semantics and Content, section 6.6.6&lt;/a&gt;
     */
    HTTP_VERSION_NOT_SUPPORTED(505, &quot;HTTP Version not supported&quot;),
    /**
     * {@code 506 Variant Also Negotiates}
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2295#section-8.1&quot;&gt;Transparent Content Negotiation&lt;/a&gt;
     */
    VARIANT_ALSO_NEGOTIATES(506, &quot;Variant Also Negotiates&quot;),
    /**
     * {@code 507 Insufficient Storage}
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc4918#section-11.5&quot;&gt;WebDAV&lt;/a&gt;
     */
    INSUFFICIENT_STORAGE(507, &quot;Insufficient Storage&quot;),
    /**
     * {@code 508 Loop Detected}
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc5842#section-7.2&quot;&gt;WebDAV Binding Extensions&lt;/a&gt;
     */
    LOOP_DETECTED(508, &quot;Loop Detected&quot;),
    /**
     * {@code 509 Bandwidth Limit Exceeded}
     */
    BANDWIDTH_LIMIT_EXCEEDED(509, &quot;Bandwidth Limit Exceeded&quot;),
    /**
     * {@code 510 Not Extended}
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc2774#section-7&quot;&gt;HTTP Extension Framework&lt;/a&gt;
     */
    NOT_EXTENDED(510, &quot;Not Extended&quot;),
    /**
     * {@code 511 Network Authentication Required}.
     * @see &lt;a href=&quot;http://tools.ietf.org/html/rfc6585#section-6&quot;&gt;Additional HTTP Status Codes&lt;/a&gt;
     */
    NETWORK_AUTHENTICATION_REQUIRED(511, &quot;Network Authentication Required&quot;);


    private final int value;

    private final String reasonPhrase;


    HttpStatus(int value, String reasonPhrase) {
        this.value = value;
        this.reasonPhrase = reasonPhrase;
    }


    /**
     * Return the integer value of this status code.
     */
    public int value() {
        return this.value;
    }

    /**
     * Return the reason phrase of this status code.
     */
    public String getReasonPhrase() {
        return this.reasonPhrase;
    }

    /**
     * Whether this status code is in the HTTP series
     * {@link org.springframework.http.HttpStatus.Series#INFORMATIONAL}.
     * This is a shortcut for checking the value of {@link #series()}.
     */
    public boolean is1xxInformational() {
        return Series.INFORMATIONAL.equals(series());
    }

    /**
     * Whether this status code is in the HTTP series
     * {@link org.springframework.http.HttpStatus.Series#SUCCESSFUL}.
     * This is a shortcut for checking the value of {@link #series()}.
     */
    public boolean is2xxSuccessful() {
        return Series.SUCCESSFUL.equals(series());
    }

    /**
     * Whether this status code is in the HTTP series
     * {@link org.springframework.http.HttpStatus.Series#REDIRECTION}.
     * This is a shortcut for checking the value of {@link #series()}.
     */
    public boolean is3xxRedirection() {
        return Series.REDIRECTION.equals(series());
    }


    /**
     * Whether this status code is in the HTTP series
     * {@link org.springframework.http.HttpStatus.Series#CLIENT_ERROR}.
     * This is a shortcut for checking the value of {@link #series()}.
     */
    public boolean is4xxClientError() {
        return Series.CLIENT_ERROR.equals(series());
    }

    /**
     * Whether this status code is in the HTTP series
     * {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR}.
     * This is a shortcut for checking the value of {@link #series()}.
     */
    public boolean is5xxServerError() {
        return Series.SERVER_ERROR.equals(series());
    }

    /**
     * Returns the HTTP status series of this status code.
     * @see HttpStatus.Series
     */
    public Series series() {
        return Series.valueOf(this);
    }

    /**
     * Return a string representation of this status code.
     */
    @Override
    public String toString() {
        return Integer.toString(this.value);
    }


    /**
     * Return the enum constant of this type with the specified numeric value.
     * @param statusCode the numeric value of the enum to be returned
     * @return the enum constant with the specified numeric value
     * @throws IllegalArgumentException if this enum has no constant for the specified numeric value
     */
    public static HttpStatus valueOf(int statusCode) {
        for (HttpStatus status : values()) {
            if (status.value == statusCode) {
                return status;
            }
        }
        throw new IllegalArgumentException(&quot;No matching constant for [&quot; + statusCode + &quot;]&quot;);
    }


    /**
     * Enumeration of HTTP status series.
     * &lt;p&gt;Retrievable via {@link HttpStatus#series()}.
     */
    public enum Series {

        INFORMATIONAL(1),
        SUCCESSFUL(2),
        REDIRECTION(3),
        CLIENT_ERROR(4),
        SERVER_ERROR(5);

        private final int value;

        Series(int value) {
            this.value = value;
        }

        /**
         * Return the integer value of this status series. Ranges from 1 to 5.
         */
        public int value() {
            return this.value;
        }

        public static Series valueOf(int status) {
            int seriesCode = status / 100;
            for (Series series : values()) {
                if (series.value == seriesCode) {
                    return series;
                }
            }
            throw new IllegalArgumentException(&quot;No matching constant for [&quot; + status + &quot;]&quot;);
        }

        public static Series valueOf(HttpStatus status) {
            return valueOf(status.value);
        }
    }

}
</code></pre>

<h3 id="6-测试示例">6. 测试示例：</h3>

<pre><code class="language-java">
    @ResponseBody
    @RequestMapping(&quot;/json&quot;)
    public Resp json(String token) {
        MemberDetails member = memberService.getMemberDetailsByToken(token);
        return Resp.success(member, 5L, 1, 3); //这里分页信息，请自己从PageHelper返回的数据中得到。参看下面注释内容：

        //Page&lt;Object&gt; page = PageHelper.startPage(1, 5);
        //MemberDetails member = memberService.getMemberDetailsByToken(token);
        //return Resp.success(member, page.getTotal(), page.getPageNum(), page.getPageSize());
    }

    @ResponseBody
    @RequestMapping(&quot;/json2&quot;)
    public Resp json2(String token) {
        MemberDetails member = memberService.getMemberDetailsByToken(token);
        Map&lt;String, Object&gt; ext = new HashMap&lt;&gt;();
        ext.put(&quot;msg&quot;, &quot;扩展内容&quot;);
        return Resp.success(&quot;成功了&quot;, member, ext, 5L, 1, 3);
    }

    @ResponseBody
    @RequestMapping(&quot;/json3&quot;)
    public Resp json3(String token) {
        MemberDetails member = memberService.getMemberDetailsByToken(token);
        return Resp.fail();
    }

    @ResponseBody
    @RequestMapping(&quot;/json4&quot;)
    public Resp json4(String token) {
        MemberDetails member = memberService.getMemberDetailsByToken(token);
        Map&lt;String, Object&gt; ext = new HashMap&lt;&gt;();
        ext.put(&quot;msg&quot;, &quot;扩展内容&quot;);
        return Resp.result(&quot;201&quot;, &quot;成功了&quot;, member);
    }

    @ResponseBody
    @RequestMapping(&quot;/json5&quot;)
    public Resp json5(String token) {
        MemberDetails member = memberService.getMemberDetailsByToken(token);
        return Resp.success(member);
    }

    @ResponseBody
    @RequestMapping(&quot;/json6&quot;)
    public Resp json6(String token) {
        MemberDetails member = memberService.getMemberDetailsByToken(token);
        return Resp.httpStatus(HttpStatus.ACCEPTED, &quot;成功了&quot;);
    }

</code></pre>

                        </div>
						 
                        
<div class="post-archive">
    <ul class="post-copyright">
        <li><strong>原文作者：</strong><a rel="author" href="http://linxianqin.gitee.io">林贤钦</a></li>
        <li style="word-break:break-all"><strong>原文链接：</strong><a href="http://linxianqin.gitee.io/post/Restful%E7%BB%9F%E4%B8%80Json%E5%B7%A5%E5%85%B7%E7%B1%BB%E5%B8%A6%E5%88%86%E9%A1%B5%E4%BF%A1%E6%81%AF/">http://linxianqin.gitee.io/post/Restful%E7%BB%9F%E4%B8%80Json%E5%B7%A5%E5%85%B7%E7%B1%BB%E5%B8%A6%E5%88%86%E9%A1%B5%E4%BF%A1%E6%81%AF/</a></li>
        <li><strong>版权声明：</strong>本作品采用<a rel="license" href="https://linxianqin.gitee.io">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a>进行许可，非商业转载请注明出处（作者，原文链接），商业转载请联系作者获得授权。</li>
    </ul>
</div>
<br/>



                        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/post/ssm&#43;vue%E8%B7%A8%E5%9F%9F%E8%A7%A3%E5%86%B3%E5%AE%9E%E4%BE%8B/">ssm&#43;vue跨域解决实例</a></li>
        
        <li><a href="/post/intBeanUtilEx%E5%B7%A5%E5%85%B7%E7%B1%BB/">BeanUtilEx工具类解决Integer=0和sql.date异常的问题</a></li>
        
        <li><a href="/post/mybatis%E9%80%86%E5%90%91%E5%B7%A5%E7%A8%8B-%E8%87%AA%E5%8A%A8%E7%94%9F%E6%88%90%E4%BB%A3%E7%A0%81/">mybatis逆向工程---自动生成代码</a></li>
        
        <li><a href="/post/springMVC%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0%E7%9A%84%E7%BB%91%E5%AE%9A/">springMVC请求参数的绑定</a></li>
        
        <li><a href="/post/hugo%E6%9B%B4%E6%96%B0%E5%8D%9A%E5%AE%A2%E5%90%8E%E9%83%A8%E7%BD%B2%E7%A0%81%E4%BA%91gitee/">Hugo更新博客后部署码云gitee</a></li>
        
    </ul>
</div>


                        <div class="post-meta meta-tags">
                            
                            <ul class="clearfix">
                                
                                <li><a href="http://linxianqin.gitee.io/tags/ssm">ssm</a></li>
                                
                            </ul>
                            
                        </div>
                    </article>
                    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "757610938/hugo-blogs-utterances"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
                </div>
            </div>
            <div id="secondary">
    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="http://linxianqin.gitee.io">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://linxianqin.gitee.io/post/java-%E5%8F%8D%E5%B0%84/" title="Java 反射">Java 反射</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/java-%E9%93%BE%E8%A1%A8/" title="Java 链表">Java 链表</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/%E7%9F%AD%E4%BF%A1%E6%B3%A8%E5%86%8C%E5%92%8C%E5%BE%AE%E4%BF%A1%E7%99%BB%E5%BD%95%E7%9A%84%E5%AE%9E%E7%8E%B0/" title="短信注册和微信登录的实现">短信注册和微信登录的实现</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/OAuth2.0%E8%AE%A4%E8%AF%81%E6%8E%88%E6%9D%83%E5%8D%95%E7%82%B9%E7%99%BB%E5%BD%95/" title="OAuth2.0认证授权单点登录">OAuth2.0认证授权单点登录</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/Nacos%E6%9C%8D%E5%8A%A1%E6%B3%A8%E5%86%8C%E4%B8%AD%E5%BF%83/" title="Nacos服务注册中心">Nacos服务注册中心</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/SpringCloud%E5%BE%AE%E6%9C%8D%E5%8A%A1/" title="SpringCloud微服务">SpringCloud微服务</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/%E9%98%BF%E9%87%8C%E4%BA%91%E8%A7%86%E9%A2%91%E7%82%B9%E6%92%AD%E6%9C%8D%E5%8A%A1/" title="阿里云视频点播服务前后端实现">阿里云视频点播服务前后端实现</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/%E9%98%9F%E5%88%97/" title="队列">队列</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/%E7%A8%80%E7%96%8F%E6%95%B0%E7%BB%84/" title="稀疏数组">稀疏数组</a>
    </li>
    
    <li>
        <a href="http://linxianqin.gitee.io/post/%E9%98%BF%E9%87%8C%E4%BA%91EasyExcel%E5%AE%9E%E7%8E%B0%E5%90%8E%E7%AB%AF%E5%AF%B9Excel%E7%9A%84%E8%AF%BB%E5%86%99%E6%93%8D%E4%BD%9C/" title="使用阿里云EasyExcel实现后端对Excel的读写操作">使用阿里云EasyExcel实现后端对Excel的读写操作</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">分类</h3>
<ul class="widget-list">
    
    <li><a href="http://linxianqin.gitee.io/categories/JWT/">JWT (2)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/hugo/">hugo (2)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/java/">java (18)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/java8/">java8 (1)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/springCloud/">springCloud (2)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/springSecurity/">springSecurity (4)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/vue/">vue (5)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/yml/">yml (1)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构 (3)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95/">软件测试 (1)</a></li>
    
    <li><a href="http://linxianqin.gitee.io/categories/%E9%98%BF%E9%87%8C%E4%BA%91/">阿里云 (4)</a></li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title">标签</h3>
<div class="tagcloud">
    
    <a href="http://linxianqin.gitee.io/tags/JWT/">JWT</a>
    
    <a href="http://linxianqin.gitee.io/tags/hugo/">hugo</a>
    
    <a href="http://linxianqin.gitee.io/tags/java/">java</a>
    
    <a href="http://linxianqin.gitee.io/tags/java8/">java8</a>
    
    <a href="http://linxianqin.gitee.io/tags/spring/">spring</a>
    
    <a href="http://linxianqin.gitee.io/tags/springBoot/">springBoot</a>
    
    <a href="http://linxianqin.gitee.io/tags/springCloud/">springCloud</a>
    
    <a href="http://linxianqin.gitee.io/tags/ssm/">ssm</a>
    
    <a href="http://linxianqin.gitee.io/tags/vue/">vue</a>
    
    <a href="http://linxianqin.gitee.io/tags/yml/">yml</a>
    
    <a href="http://linxianqin.gitee.io/tags/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/">数据结构</a>
    
    <a href="http://linxianqin.gitee.io/tags/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95/">软件测试</a>
    
    <a href="http://linxianqin.gitee.io/tags/%E9%98%BF%E9%87%8C%E4%BA%91/">阿里云</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://www.cnki.net" title="中国知网">中国知网</a>
        </li>
        
        <li>
            <a target="_blank" href="https://linxianqin.com" title="个人的另一个博客网站(国内加载慢)">个人的另一个博客网站(国内加载慢)</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="http://linxianqin.gitee.io/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        &copy; 2020 <a href="http://linxianqin.gitee.io">林贤钦 By 林贤钦</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="https://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/rujews/maupassant-hugo" target="_blank">maupassant</a>.
        
    </div>
</footer>


    
    <script type="text/javascript">
        
        (function () {
            $("pre code").parent().addClass("line-numbers")
        }());

        window.MathJax = {
            tex2jax: {
                inlineMath: [['$', '$']],
                processEscapes: true
                }
            };
    </script>
    <script type="text/javascript" src="/js/prism.js" async="true"></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>


<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/js/totop.js?v=0.0.0" async=""></script>

<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'GA ID', 'auto');
	
	ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>



    <script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




</body>
</html>
